<?php
Yii::import('common.models._base.BaseTeam');

class Team extends BaseTeam {

    public static function model($className = __CLASS__) {
        return parent::model($className);
    }

    public function rules() {
        return array(
            array('member_name, member_designating, about_member', 'required'),
            array('member_name', 'length', 'max' => 145),
            array('member_designating, photo, status', 'length', 'max' => 45),
            array('status', 'default', 'setOnEmpty' => true, 'value' => null),
            array('photo,', 'file', 'allowEmpty' => false, 'on' => 'insert',
                'types' => 'jpg, jpeg,gif,png',
                'maxSize' => 1024 * 1024 * 1, // 1MB
                'tooLarge' => 'The file was larger than 1MB. Please upload a smaller file.'),
            array('id, member_name, member_designating, about_member, photo, status', 'safe', 'on' => 'search'),
        );
    }
    public function attributeLabels() {
		return array(
			'id' => Yii::t('app', 'ID'),
			'member_name' => Yii::t('app', 'Name'),
			'member_designating' => Yii::t('app', 'Designating'),
			'about_member' => Yii::t('app', 'About'),
			'photo' => Yii::t('app', 'Photo'),
			'status' => Yii::t('app', 'Status'),
		);
	}

}